<?php

namespace App\Http\Requests\Cms;

use Illuminate\Foundation\Http\FormRequest;

class ArticleUpdateRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array<string, mixed>
     */
    public function rules()
    {
        return [
            'detail_id' => 'required',
            'cate_id' => 'required|max:255',
            'title' => 'required|max:255',
            'description' => 'nullable|max:255',
            'content' => 'required',
        ];
    }
    public function attributes()
    {
        return [
            'detail_id' => '文章ID',
            'cate_id' => '栏目ID',
            'title' => '文章标题',
            'description' => '描述',
            'content' => '文章内容',
        ];
    }
}
